(compose-gstring-for-terminal): For zero-width
authorKenichi Handa <handa@m17n.org>
Wed, 10 Jun 2009 00:34:19 +0000 (00:34 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 10 Jun 2009 00:34:19 +0000 (00:34 +0000)
characters of Unicode category `Cf', simply replace it with SPC.

lisp/composite.el

index d3c000fe8395caefd38b92e423b76e8203d41acf..ce34336cedec59143bf0cd0c24762a0b8d6054bb 100644 (file)
@@ -681,7 +681,14 @@ a prepending a space before it."
              (lglyph-set-from-to glyph i i)
              (setq i (1+ i))))
        (if (= (lglyph-width glyph) 0)
-           (progn
+           (if (eq (get-char-code-property (lglyph-char glyph)
+                                           'general-category)
+                   'Cf)
+               (progn
+                 ;; Compose by replacing with a space.
+                 (lglyph-set-char glyph 32)
+                 (lglyph-set-width glyph 1)
+                 (setq i (1+ i)))
              ;; Compose by prepending a space.
              (setq gstring (lgstring-insert-glyph gstring i
                                                   (lglyph-copy glyph))